﻿using System;

using Fuse8.DomainFramework.Domain;
using Fuse8.DomainFramework.BusinessService;

namespace Fuse8.DomainFramework.ValidationService
{
    /// <summary>
    /// 
    /// </summary>
    public enum ValidationActionType
    {
        /// <summary>
        /// 
        /// </summary>
        Create = 0,
        /// <summary>
        /// 
        /// </summary>
        Update = 1,
        /// <summary>
        /// 
        /// </summary>
        Delete = 2
    }
    
    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="TEntity"></typeparam>
    /// <typeparam name="TKey"></typeparam>
    public class ValidationEntityPreEventArgs<TEntity, TKey> : EntityPreEventArgs<TEntity, TKey>
        where TEntity : class, IEntityObject<TKey>
        where TKey : IComparable<TKey>, IEquatable<TKey> 
    {
        /// <summary>
        /// 
        /// </summary>
        public ValidationActionType ValidationAction { get; set; }
        
        /// <summary>
        /// 
        /// </summary>
        public ValidationEntityPreEventArgs()
            : base()
        { }
    }
}
